/*
** my_revstr.c for my_revstr in /home/goupil_r//afs/local/Jour_04
** 
** Made by robin goupil
** Login   <goupil_r@epitech.net>
** 
** Started on  Thu Oct  4 11:29:54 2012 robin goupil
** Last update Mon Oct  8 11:17:05 2012 robin goupil
*/

void	my_swap_char(char *a, char *b)
{
  char	c;

  c = *b;
  *b = *a;
  *a = c;
}

int	my_strlen(char *str)
{
  int	size;

  size = 0;
  while (str[size] != '\0')
    {
      size = size  + 1;
    }
  return (size);
}

char	*my_revstr(char *str)
{
  int	size;
  char	*i;

  size = my_strlen(str);
  i = str + size - 1;
  while (str < i)
    {
      my_swap_char(str, i);
      str = str + 1;
      i = i - 1;
    }
  return (str - (size / 2));
}
